\chapter{Ilustračné obrázky}

\begin{figure}[h!]
\centering
\begin{tikzpicture}[scale=1, node distance = 1.5cm, auto]
    % Place nodes
    \node [block,text width=1cm] (11) {\textbf{1}};
    \node [block, right of=11,text width=1cm] (21) {\textbf{2}};
	\node [block, right of=21,text width=1cm] (31) {\textbf{3}};
    \node [block, below of=11,text width=1cm, node distance=1cm] (12) {\textbf{1'}};
	\node [block, below of=21,text width=1cm, node distance=1cm] (22) {\textbf{2'}};
	\node [block, below of=31,text width=1cm, node distance=1cm] (32) {\textbf{3'}};
    
	\node [block, right of=31,text width=1cm, node distance=2cm] (41) {\textbf{1}};
	\node [block, right of=41,text width=1cm, node distance=1.5cm] (51) {\textbf{2}};
	\node [block, right of=51,text width=1cm, node distance=1.5cm] (61) {\textbf{3}};
	\node [block, below of=41,text width=1cm, node distance=1cm] (42) {\textbf{1'}};
	\node [block, below of=51,text width=1cm, node distance=1cm] (52) {\textbf{null}};
	\node [block, below of=61,text width=1cm, node distance=1cm] (62) {\textbf{2'}};	
    
	\coordinate (MiddleA) at ($(11)!0.5!(31)$);
	\node [above of=MiddleA, node distance = 1cm] (lb_one) {\textbf{$\boldsymbol\alpha$-helixy}};
	\node [left of=11, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=12, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};
	
	\coordinate (MiddleB) at ($(41)!0.5!(61)$);
	\node [above of=MiddleB, node distance = 1cm] (lb_two) {\textbf{$\boldsymbol\beta$-skladané listy}};
	\node [below of=12] (line_beg) {};
	\node [below of=62] (line_end) {};
	% Draw edges
	\draw [draw, -latex',bend left=40] (11) edge (31);
	\draw [draw, -latex',bend right=40] (31) edge (11);
	\draw (-2,-1.75) --  (8,-1.75);
	
	%% next pairing
	\node [block, fill=black!10, below of=12,text width=1cm] (13) {\textbf{3}};
    \node [block, below of=22,text width=1cm] (23) {\textbf{2}};
	\node [block, fill=black!10, below of=32,text width=1cm] (33) {\textbf{1}};
    \node [block, below of=13,text width=1cm, node distance=1cm] (14) {\textbf{1'}};
	\node [block, below of=23,text width=1cm, node distance=1cm] (24) {\textbf{2'}};
	\node [block, below of=33,text width=1cm, node distance=1cm] (34) {\textbf{3'}};
    
	\node [block, right of=33,text width=1cm, node distance=2cm] (43) {\textbf{1}};
	\node [block, right of=43,text width=1cm, node distance=1.5cm] (53) {\textbf{2}};
	\node [block, right of=53,text width=1cm, node distance=1.5cm] (63) {\textbf{3}};
	\node [block, below of=43,text width=1cm, node distance=1cm] (44) {\textbf{1'}};
	\node [block, below of=53,text width=1cm, node distance=1cm] (54) {\textbf{null}};
	\node [block, below of=63,text width=1cm, node distance=1cm] (64) {\textbf{2'}};
	
    
	\node [left of=13, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=14, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};
	
	%\path [line] (init) -- (create_init_pop);
\end{tikzpicture}
\caption{Operácia \textit{hop} v GA}
\label{k2:ga_hop}
\end{figure}

\begin{figure}[h!]
\centering
\begin{tikzpicture}[scale=1, node distance = 1.5cm, auto]
    % Place nodes
    \node [block,text width=1cm] (11) {\textbf{1}};
    \node [block, right of=11,text width=1cm] (21) {\textbf{2}};
	\node [block, right of=21,text width=1cm] (31) {\textbf{3}};
    \node [block, below of=11,text width=1cm, node distance=1cm] (12) {\textbf{1'}};
	\node [block, below of=21,text width=1cm, node distance=1cm] (22) {\textbf{2'}};
	\node [block, below of=31,text width=1cm, node distance=1cm] (32) {\textbf{3'}};
    
	\node [block, right of=31,text width=1cm, node distance=2cm] (41) {\textbf{1}};
	\node [block, right of=41,text width=1cm, node distance=1.5cm] (51) {\textbf{2}};
	\node [block, right of=51,text width=1cm, node distance=1.5cm] (61) {\textbf{3}};
	\node [block, below of=41,text width=1cm, node distance=1cm] (42) {\textbf{1'}};
	\node [block, below of=51,text width=1cm, node distance=1cm] (52) {\textbf{2'}};
	\node [block, below of=61,text width=1cm, node distance=1cm] (62) {\textbf{3'}};
	
    
	\coordinate (MiddleA) at ($(11)!0.5!(31)$);
	\node [above of=MiddleA, node distance = 0.5cm] (lb_one) {\textbf{$\boldsymbol\alpha$-helixy}};
	\node [left of=11, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=12, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};
	
	\coordinate (MiddleB) at ($(41)!0.5!(61)$);
	\node [above of=MiddleB, node distance = 0.5cm] (lb_two) {\textbf{$\boldsymbol\beta$-skladané listy}};
	
	\draw (-2,-1.75) --  (8,-1.75);
	
	%% next pairing
	\node [block, fill=black!10, below of=12,text width=1cm] (13) {\textbf{1}};
    \node [block, fill=black!10, below of=22,text width=1cm] (23) {\textbf{2}};
	\node [block, fill=black!10, below of=32,text width=1cm] (33) {\textbf{3}};
    \node [block, fill=black!10, below of=13,text width=1cm, node distance=1cm] (14) {\textbf{1'}};
	\node [block, fill=black!10, below of=23,text width=1cm, node distance=1cm] (24) {\textbf{2'}};
	\node [block, fill=black!10, below of=33,text width=1cm, node distance=1cm] (34) {\textbf{3'}};
    
	\node [block, fill=black!10, right of=33,text width=1cm, node distance=2cm] (43) {\textbf{1}};
	\node [block, fill=black!10, right of=43,text width=1cm, node distance=1.5cm] (53) {\textbf{2}};
	\node [block, fill=black!10, right of=53,text width=1cm, node distance=1.5cm] (63) {\textbf{3}};
	\node [block, fill=black!10, below of=43,text width=1cm, node distance=1cm] (44) {\textbf{1'}};
	\node [block, fill=black!10, below of=53,text width=1cm, node distance=1cm] (54) {\textbf{2'}};
	\node [block, fill=black!10, below of=63,text width=1cm, node distance=1cm] (64) {\textbf{3'}};
	
    
	\node [left of=13, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=14, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};	
\end{tikzpicture}
\caption{Rodičovské indivídua pre operáciu \textit{kríženia} v GA}
\label{k2:ga_crossover_parents}
\end{figure}

\begin{figure}[h!]
\centering
\begin{tikzpicture}[scale=1, node distance = 1.5cm, auto]
    % Place nodes
    \node [block,text width=1cm] (11) {\textbf{1}};
    \node [block, right of=11,text width=1cm] (21) {\textbf{2}};
	\node [block, right of=21,text width=1cm] (31) {\textbf{3}};
    \node [block, below of=11,text width=1cm, node distance=1cm] (12) {\textbf{1'}};
	\node [block, below of=21,text width=1cm, node distance=1cm] (22) {\textbf{2'}};
	\node [block, below of=31,text width=1cm, node distance=1cm] (32) {\textbf{3'}};
  
	\node [block, fill=black!10, right of=31,text width=1cm, node distance=2cm] (41) {\textbf{1}};
	\node [block, fill=black!10, right of=41,text width=1cm, node distance=1.5cm] (51) {\textbf{2}};
	\node [block, fill=black!10, right of=51,text width=1cm, node distance=1.5cm] (61) {\textbf{3}};
	\node [block, fill=black!10, below of=41,text width=1cm, node distance=1cm] (42) {\textbf{1'}};
	\node [block, fill=black!10, below of=51,text width=1cm, node distance=1cm] (52) {\textbf{2'}};
	\node [block, fill=black!10, below of=61,text width=1cm, node distance=1cm] (62) {\textbf{3'}};
    
	\coordinate (MiddleA) at ($(11)!0.5!(31)$);
	\node [above of=MiddleA, node distance = 0.5cm] (lb_one) {\textbf{$\boldsymbol\alpha$-helixy}};
	\node [left of=11, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=12, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};
	
	\coordinate (MiddleB) at ($(41)!0.5!(61)$);
	\node [above of=MiddleB, node distance = 0.5cm] (lb_two) {\textbf{$\boldsymbol\beta$-skladané listy}};
	\draw (-2,-1.75) --  (8,-1.75);
	
	%% next pairing
	\node [block, fill=black!10, below of=12,text width=1cm] (13) {\textbf{1}};
    \node [block, fill=black!10, below of=22,text width=1cm] (23) {\textbf{2}};
	\node [block, fill=black!10, below of=32,text width=1cm] (33) {\textbf{3}};
    \node [block, fill=black!10, below of=13,text width=1cm, node distance=1cm] (14) {\textbf{1'}};
	\node [block, fill=black!10, below of=23,text width=1cm, node distance=1cm] (24) {\textbf{2'}};
	\node [block, fill=black!10, below of=33,text width=1cm, node distance=1cm] (34) {\textbf{3'}};
    
	\node [block, right of=33,text width=1cm, node distance=2cm] (43) {\textbf{1}};
	\node [block, right of=43,text width=1cm, node distance=1.5cm] (53) {\textbf{2}};
	\node [block, right of=53,text width=1cm, node distance=1.5cm] (63) {\textbf{3}};
	\node [block, below of=43,text width=1cm, node distance=1cm] (44) {\textbf{1'}};
	\node [block, below of=53,text width=1cm, node distance=1cm] (54) {\textbf{2'}};
	\node [block, below of=63,text width=1cm, node distance=1cm] (64) {\textbf{3'}};
	
    
	\node [left of=13, node distance = 2cm] (lb_proteinA) {\textbf{Proteín A}};
	\node [left of=14, node distance = 2cm] (lb_proteinB) {\textbf{Proteín B}};	

\end{tikzpicture}
\caption{Potomkovia po operácii \textit{kríženia} v GA}
\label{k2:ga_crossover_children}
\end{figure}

\begin{figure}[h!]
\centering
\begin{tikzpicture}[scale=1, node distance = 1cm, auto, font=\scriptsize]
    % Place nodes
    \node [block] (init) {\textbf{Generácia := 0}};
    \node [block, below of=init, node distance=1.5cm] (create_init_pop) {\textbf{Vytvorenie náhodnej počiatočnej populácie}};
	\node [decision, below of=create_init_pop, node distance=3cm] (termination) {\textbf{Je terminačná podmienka splnená?}};
	\node [block, right of=termination,node distance=4.5cm] (result) {\textbf{Určenie výsledku}};
	\node [block, below of=result,text width=2cm] (end) {\textbf{Koniec}};
	\node [block, below of=termination,node distance=3cm] (eval_fitness) {\textbf{Určenie \textit{fitness} pre každého jedinca v populácii}};
	\node [block, below of=eval_fitness,text width=2cm, node distance=1.5cm] (init_i) {\textbf{i := 0}};
	\node [decision, below of=init_i, node distance=2cm] (i_M) {\textbf{i $\stackrel{?}{=}$ M}};
	\node [block, left of=i_M,node distance=3.5cm] (increase_G) {\textbf{Generácia := Generácia + 1}};
	\node [decision, below of=i_M, node distance=3.5cm] (gen_operation) {\textbf{Výber genetickej operácie podľa pravdepodobnosti}};
	\node [block, left of=gen_operation, node distance=4.5cm] (select_one) {\textbf{Výber jedného indivídua podľa \textit{fitness}}};
	\node [block, right of=gen_operation, node distance=4.5cm] (select_two) {\textbf{Výber dvoch indivíduí podľa \textit{fitness}}};
	\node [block, below of=select_one, node distance=1.5cm] (reproduction) {\textbf{Reprodukcia}};
	\node [block, below of=reproduction, node distance=1cm] (copy) {\textbf{Skopírovanie do novej populácie}};
	
	\node [block, below of=select_two, node distance=1.5cm] (inc_i_cross) {\textbf{i := i + 1}};
	\node [block, below of=inc_i_cross, node distance=1cm] (crossover)	{\textbf{Kríženie}};
	\node [block, below of=crossover, node distance=1cm] (insert_two) {\textbf{Vloženie potomkov do novej populácie}};
	\node [block, below of=gen_operation,text width=2cm, node distance=5cm] (inc_i) {\textbf{i := i + 1}};
	% Draw edges
	\path [line] (init) -- (create_init_pop);
	\path [line] (create_init_pop) -- (termination);
	\path [line] (termination) -- node {\textbf{Áno}}(result);
	\path [line] (result) -- (end);
	\path [line] (termination) -- node {\textbf{Nie}}(eval_fitness);
	\path [line] (eval_fitness) -- (init_i);
	\path [line] (init_i) -- (i_M);
	\path [line] (i_M) -- node {\textbf{Áno}}(increase_G);
    \path [line] (increase_G.north) -- ++(0,5.95) -| (termination.west);
    \path [line] (i_M) -- node {\textbf{Nie}} (gen_operation);
    \path [line] (gen_operation.west) -- node {\textbf{$P_{r}$}} (select_one);
    \path [line] (gen_operation.east) -- node {\textbf{$P_{c}$}} (select_two);
	\path [line] (select_one) -- (reproduction);
	\path [line] (reproduction) -- (copy);
	\path [line] (select_two) -- (inc_i_cross);
	\path [line] (inc_i_cross) -- (crossover);
	\path [line] (crossover) -- (insert_two);
	
	\path [line] (copy.south) -- (inc_i);
	\path [line] (insert_two.south) -- (inc_i);
	
	\path [line] (inc_i.east) -- ++(6,0) -- ++(0,8.58) -| (i_M.east);
\end{tikzpicture}
\caption{Diagram paradigmy genetického programovania}
\label{app:paradigm}
\end{figure}